import numpy as np
import matplotlib.pyplot as plt
def gd(alpha):
	x = 10
	results = [x]
	for i in range(10):
		x -= alpha * (2 * x) # f(x)=x*x的导数为f'(x)=2*x
		results.append(x)
	print('epoch 10, x:', x)
	return results
res = gd(0.2)
